export default () => {
  const dictMap = {}
  let integrationList = window.SITE_CONFIG['dictList'].find(i => i.dictType === 'integration_list').dataList || []
  integrationList.forEach(ele => {
    if (ele.remark) {
      if (!dictMap[ele.remark]) {
        dictMap[ele.remark] = []
      }
      dictMap[ele.remark].push(ele)
    } else {
      if (!dictMap['Others']) {
        dictMap['Others'] = []
      }
      dictMap['Others'].push(ele)
    }
  })
  return [
    { label: 'PSA', children: dictMap['PSA'] || [] },
    { label: 'RMM Platform', children: dictMap['RMM Platform'] || [] },
    { label: 'Others', children: dictMap['Others'] || [] }
  ]
}